import Text from '@/base/Text';
import XUE from '../XUE';

XUE.registerComponent('text', {
    name: '文字',
    getEntity(canvas, defaultStyle) {
        return new Text(canvas, {
            text: 'Hello World',
            fontSize: '32px',
            fontFamily: '仿宋',
            textAlign: 'center',
            left: '50%',
            bottom: '50%',
        });
    },
    defaultStyle: {
        left: '240px',
        bottom: '240px',
        width: '240px',
        height: '120px',
        color: '#32B4FF',
        type: Text.TYPE.FILL,
    },
});
